<?php

/*
#------------------------------------------------------------------------
# myStore - May 2010 (for Joomla 1.5)
#
# Copyright (C) 2007-2010 Gavick.com. All Rights Reserved.
# License: Copyrighted Commercial Software
# Website: http://www.gavick.com
# Support: support@gavick.com   
#------------------------------------------------------------------------ 
# Based on T3 Framework
#------------------------------------------------------------------------
# Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
# @license - GNU/GPL, http://www.gnu.org/copyleft/gpl.html
# Author: J.O.O.M Solutions Co., Ltd
# Websites: http://www.joomlart.com - http://www.joomlancers.com
#------------------------------------------------------------------------
*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

$user =& JFactory::getUser();
// getting User ID
$userID = $user->get('id');

?>

<?php if( GK_LOGIN || GK_REGISTER || GK_TOOLS || $this->countModules('cart + topmenu')) : ?>
<div id="gk-toolbar">	
	<?php if($this->countModules('topmenu')): ?>
	<div id="gk-top-menu">
		<jdoc:include type="modules" name="topmenu" style="none" />	
	</div>
	<?php endif; ?>
	
	<?php if($this->countModules('cart')) : ?>
	<div id="gk-items" style="float:right;">
		( <strong>...</strong> <?php echo JText::_('GK_ITEMS'); ?> )
	</div>
	<div id="gk-cart">
		<a href="#" id="btn_cart"><span><?php echo JText::_('GK_CART'); ?></span></a>
	</div>
	<?php endif; ?>
	
	<?php if( GK_LOGIN || GK_REGISTER || GK_TOOLS ) : ?>
	<div id="gk-tools">
		<div>
			<?php if(GK_TOOLS) : ?>
			<a href="#" id="btn_tools"><span><?php echo JText::_('GK_TOOLS'); ?></span></a>
			
			<div class="gk_hide">
				<div class="gk_popup-hide" id="popup_tools">
					<?php $this->loadBlock('usertools/tools') ?>
				</div>
			</div>
			<?php endif; ?>
		
			<?php if(GK_REGISTER) : ?>
			<a href="<?php echo $this->baseurl(); ?>index.php?option=com_user&amp;view=register" id="btn_register"><span><?php echo JText::_('GK_REGISTER'); ?></span></a>
			<?php endif; ?>

			<?php if(GK_LOGIN) : ?>
			<a href="<?php echo $this->baseurl(); ?>index.php?option=com_user&amp;view=login" id="btn_login"><span><?php echo ($userID > 0) ? JText::_('GK_LOGOUT') : JText::_('GK_LOGIN'); ?></span></a>
			<?php endif; ?>
		</div>
	</div>
	<?php endif; ?>
</div>
<?php endif; ?>